/*
File Name: LedBlinking.c
Written by: Sam Lee
Last Modify: December 03, 2009
*/

#include "p33FJ256GP710.h"
#include "delay.h"

_FGS(GWRP_OFF & GCP_OFF); //Code Protect Off
//_FOSCSEL(FNOSC_PRIPLL);
//_FOSC(FCKSM_CSECMD & OSCIOFNC_OFF  & POSCMD_NONE);
_FOSCSEL(FNOSC_FRC);            // Internal FRC oscillator
_FOSC(FCKSM_CSDCMD & OSCIOFNC_OFF & POSCMD_XT);
//_FOSC(FCKSM_CSECMD & OSCIOFNC_OFF  & POSCMD_XT);  
       // Clock Switching is enabled
                  //OSC2 is Clock Output
                           // Primary Oscillator Mode: XT Crystal

_FWDT(FWDTEN_OFF);

int main ( void )
{
  /* set LED pins (RE7- RE0) as outputs */
  TRISE = 0xFF00;

  
  /* Infinite Loop */  
  while ( 1 )
  {
    /* set LED pins (RE7- RE0) ON */
    PORTE = 0x00FF;
    Delay(800);
    /* set LED pins (RE7- RE0) OFF */
    PORTE = 0xFF00;
    Delay(2400);
  };
}